package vip.specimen.system.datasource.validation;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.*;

/**
 * *@Author: 余浪人
 * *@Date：2021/02/21 16:53
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Getter
@Setter
public class SystemEmailConfigValidation {
    @Pattern(regexp = "^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)$", message = "请输入合法的IP")
    private String emailAddress;

    @Min(value = 1,message = "请输入合法的端口号")
    @Max(value = 65535,message = "请输入合法的端口号")
    private int emailPost;

    @Email(message = "邮箱账号不合法")
    @NotBlank(message = "邮箱账号不可为空")
    @Size(min = 1,max = 255,message = "邮箱长度不合法")
    private String emailAccount;

    @NotBlank(message = "邮箱密码不可为空")
    @Size(min = 1,max = 255,message = "邮箱密码长度不合法")
    private String emailPassword;
}
